/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.navid.trafalgar.mod.counterclock;

import com.navid.trafalgar.model.AMillestoneModel;
import com.navid.trafalgar.model.AShipModel;
import com.navid.trafalgar.model.GameModel;
import com.navid.trafalgar.model.IContext;
import java.util.Map;

/**
 *
 * @author alberto
 */
public class CounterClockGameModel {
    
    private Map<String, AMillestoneModel> millestones;
    private AShipModel ship;
    private IContext context;
    
    public CounterClockGameModel(GameModel gameModel){
        if(gameModel.getShips().size() != 1){
            throw new IllegalArgumentException("Incorrect number of ships defined for a Millestone game, it has to be 1");
        }
       
        
        ship = gameModel.getShips().values().iterator().next();
        millestones = gameModel.getMillestones();
        context = gameModel.getiContext();
        
    }

    /**
     * @return the millestones
     */
    public Map<String, AMillestoneModel> getMillestones() {
        return millestones;
    }

    /**
     * @param millestones the millestones to set
     */
    public void setMillestones(Map<String, AMillestoneModel> millestones) {
        this.millestones = millestones;
    }

    /**
     * @return the ship
     */
    public AShipModel getShip() {
        return ship;
    }

    /**
     * @param ship the ship to set
     */
    public void setShip(AShipModel ship) {
        this.ship = ship;
    }

    public IContext getIContext() {
        return context;
    }
    
    
    
}
